<template>
  <header>
    <div class="searchBar">
      <a href="javascript:void(0);"
         class="sideButton"
         @click="tohome">
        <van-icon name="arrow-left"
                  size="25"
                  color="#333333" />
      </a>
      <div class="inputBox">
        <a href="javascript:void(0);"
           @click="goSearch">
          <van-icon name="search"
                    size="16"
                    color="#9c9c9c" />
          <span>5G手机</span>
        </a>
      </div>
      <a href="javascript:void(0);"
         class="sideButton">
        <van-icon name="apps-o"
                  size="25"
                  color="#333333" />
      </a>
    </div>
  </header>
</template>
<script>
export default {
  data () {
    return {};
  },
  methods: {
    tohome () {
      this.$router.push("/home");
    },
    goSearch () {
      this.$router.push("/search");
    }
  }
};
</script>
<style scoped>
header {
  width: 100vw;
  height: 0.88rem;
}
.searchBar {
  width: 100%;
  height: 100%;
}
.sideButton {
  display: block;
  float: left;
  width: 0.88rem;
  height: 0.88rem;
}
.sideButton i {
  display: block;
  width: 0.88rem;
  height: 0.88rem;
  font: 30px;
  line-height: 0.88rem;
  text-align: center;
}
.inputBox {
  float: left;
  width: 5.74rem;
  height: 0.88rem;
}
.inputBox a {
  display: block;
  margin-top: 0.1rem;
  height: 0.78rem;
  width: 100%;
  border-radius: 16px;
  background-color: #f5f5f5;
}
.inputBox span {
  float: left;
  font-size: 14px;
  color: #9c9c9c;
  height: 0.88rem;
  line-height: 0.88rem;
}
.inputBox i {
  font-weight: bold;
  float: left;
  height: 0.88rem;
  line-height: 0.88rem;
  text-align: center;
  margin: 0 4px;
}
</style>